using System;

using System.Drawing;
using System.Windows.Forms;
using System.ComponentModel;
using System.Drawing.Drawing2D;

namespace EForms
{
	/// <summary>
	/// Summary description for EToolBar.
	/// </summary>
	public class EToolBar : ToolBar
	{
		private Color backgroundHighColor		= Color.Gainsboro;
		private Color backgroundLowColor		= Color.White;

		public EToolBar()
		{
			
		}
		[DefaultValue(typeof(Color),"Gainsboro"),
		Description("High color used on to give gradient background effect"),
		Category("Appearance")]
		public Color BackgroundHighColor
		{
			get 
			{ 
				return this.backgroundHighColor; 
			}
			set 
			{ 
				this.backgroundHighColor = value;
				this.Invalidate();
			}
		}


		[DefaultValue(typeof(Color),"White"),
		Description("Low color used on to give gradient background effect"),
		Category("Appearance")]
		public Color BackgroundLowColor
		{
			get 
			{ 
				return this.backgroundLowColor; 
			}
			set 
			{ 
				this.backgroundLowColor = value;
				this.Invalidate();
			}
		}
		protected override void OnPaintBackground(PaintEventArgs pevent)
		{
			LinearGradientBrush backgroundBrush = new LinearGradientBrush(this.ClientRectangle, backgroundHighColor, backgroundLowColor,	LinearGradientMode.Vertical);
			pevent.Graphics.FillRectangle(backgroundBrush, this.ClientRectangle);
			backgroundBrush.Dispose();
		}
	}
}
